html,
body {
  font-family: -apple-system, "BlinkMacSystemFont", sans-serif;
  margin: 0;
  background: aliceblue;
  scroll-behavior: smooth;
}

:root {
  --ease: linear(
    0 0%,
    0 2.27%,
    0.02 4.53%,
    0.04 6.8%,
    0.06 9.07%,
    0.1 11.33%,
    0.14 13.6%,
    0.25 18.15%,
    0.39 22.7%,
    0.56 27.25%,
    0.77 31.8%,
    1 36.35%,
    0.89 40.9%,
    0.85 43.18%,
    0.81 45.45%,
    0.79 47.72%,
    0.77 50%,
    0.75 52.27%,
    0.75 54.55%,
    0.75 56.82%,
    0.77 59.1%,
    0.79 61.38%,
    0.81 63.65%,
    0.85 65.93%,
    0.89 68.2%,
    1 72.7%,
    0.97 74.98%,
    0.95 77.25%,
    0.94 79.53%,
    0.94 81.8%,
    0.94 84.08%,
    0.95 86.35%,
    0.97 88.63%,
    1 90.9%,
    0.99 93.18%,
    0.98 95.45%,
    0.99 97.73%,
    1 100%
  );
}

body {
  padding: 0 15px;
  timeline-scope: --t1, --t2, --t3, --t4, --t5, --t6;
}
body .content {
  view-timeline-name: var(--s);
  view-timeline-inset: 80% 20%;
}
body nav {
  position: fixed;
  top: 15px;
  right: 15px;
  background: #fff;
  padding: 10px 0;
  border-radius: 4px;
  overflow: hidden;
}
body nav a {
  position: relative;
  display: block;
  line-height: 2;
  padding: 0 15px;
  font-size: 14px;
  color: #191919;
  text-decoration: none;
  animation-name: active;
  animation-timeline: var(--s);
  border-left: 4px solid transparent;
}
body nav a:hover {
  background-color: rgba(213, 213, 213, 0.2901960784);
}
@keyframes active {
  0%, 100% {
    color: #6f00ff;
    border-color: #6f00ff;
  }
}

h2 {
  margin: 0;
  padding: 0.8em 0;
  scroll-margin: 20px;
}

.content div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.content div span {
  width: 30%;
  height: 100px;
  border-radius: 4px;
  background-color: #e4ccff;
}

.wrapper {
  margin: 50px auto;
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 300px;
  height: 400px;
  border-bottom: 3px solid;
}
.wrapper .ball {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #9747ff;
  animation: ballDrop 2s infinite linear(0 0%, 0 2.27%, 0.02 4.53%, 0.04 6.8%, 0.06 9.07%, 0.1 11.33%, 0.14 13.6%, 0.25 18.15%, 0.39 22.7%, 0.56 27.25%, 0.77 31.8%, 1 36.35%, 0.89 40.9%, 0.85 43.18%, 0.81 45.45%, 0.79 47.72%, 0.77 50%, 0.75 52.27%, 0.75 54.55%, 0.75 56.82%, 0.77 59.1%, 0.79 61.38%, 0.81 63.65%, 0.85 65.93%, 0.89 68.2%, 1 72.7%, 0.97 74.98%, 0.95 77.25%, 0.94 79.53%, 0.94 81.8%, 0.94 84.08%, 0.95 86.35%, 0.97 88.63%, 1 90.9%, 0.99 93.18%, 0.98 95.45%, 0.99 97.73%, 1 100%), moveX 2s infinite ease-out;
  animation-composition: add;
}
@keyframes ballDrop {
  50%, 100% {
    transform: translateY(350px);
  }
}
@keyframes moveX {
  60%, 100% {
    transform: translateX(150px);
  }
}
.wrapper .square {
  width: 100px;
  height: 100px;
  margin: auto 0;
  background-color: #14ae5c;
  transform: scale(0);
  border-radius: 8px;
  animation: scale 2s infinite var(--ease);
}

@keyframes scale {
  to {
    transform: scale(1);
  }
}